#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>

void* func(void *);

int main(int argc,char** argv)
{
  pthread_t tid;
  printf(" main pid %d,tid %lu\n",getpid(),pthread_self());

  pthread_create(&tid,NULL,func,NULL);


  sleep(1);
  return 0;
}

void* func(void *num)
{
  int i = 0;
  while(1)
  {
    printf("hello world,%d\n",i++);
  }
}
